package com.antifly.common.dao;

import com.antifly.common.pojo.entity.SysGlobalAttachmentDO;
import com.baomidou.mybatisplus.extension.plugins.pagination.Page;
import com.baomidou.mybatisplus.extension.service.IService;

import java.util.List;
import java.util.Map;

/**
 * 附件表(SysGlobalAttachment)Dao接口
 *
 * @author makejava
 * @date 2023-04-25
 */
public interface SysGlobalAttachmentDao extends IService<SysGlobalAttachmentDO> {

    /**
     * 分页查询附件表信息
     * @param key 搜索关键字
     * @param pageNum 当前页码
     * @param pageSize 每页展示数 当值为-1时默认展示全部
     * @return
     */
    Page<SysGlobalAttachmentDO> selectSysGlobalAttachmentList(String key, Integer pageNum, Integer pageSize);

    /**
     * 查询所有附件表信息
     * @return
     */
    List<SysGlobalAttachmentDO> selectSysGlobalAttachmentList();
    
    /**
     * 查询所有附件表信息
     * 
     * @return
     */
    List<Map<String, Object>> selectMaps();
    
     /**
     * 根据id查询附件表信息
     * @param id 主键ID
     * @return
     */
     SysGlobalAttachmentDO selectSysGlobalAttachmentById(String id);

    /**
     * 插入附件表信息
     * @param sysGlobalAttachmentDO 附件表信息
     * @return 附件表ID，失败为null
     */
    String insertSysGlobalAttachment(SysGlobalAttachmentDO sysGlobalAttachmentDO);

    /**
     * 更新附件表
     * @param sysGlobalAttachmentDO 附件表信息
     * @return
     */
    Boolean updateSysGlobalAttachment(SysGlobalAttachmentDO sysGlobalAttachmentDO);


    /**
     * 删除附件表
     * @param sysGlobalAttachmentId 附件表ID
     * @return
     */
    Boolean deleteSysGlobalAttachment(String sysGlobalAttachmentId);


}